package com.yanqu.road.server.gameplayer.module.base;

import com.yanqu.road.server.gameplayer.GamePlayer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public abstract class GeneralModule extends AbsGeneralModule<GamePlayer> {

    protected Logger log = LogManager.getLogger(this.getClass().getName());

    public GeneralModule(GamePlayer player) {
        super(player);
    }

    public long getUserId() {
        return player.getUserId();
    }

    public abstract boolean loadData();

    public abstract boolean afterLoadData();

    public abstract boolean saveData();

    @Override
    public Class<?> getModuleClass() {
        return this.getClass();
    }

    public void loginSendMsg() {

    }

    public void afterLogin() {

    }

    public void printErrorSqlDataFromMemory() {

    }

    public String getPlayerDataFromMemory() {
        return "{}";
    }
}
